/*
 * An XML document type.
 * Localname: search
 * Namespace: 
 * Java type: com.guardianapis.api.domain.xmlbeans.SearchDocument
 *
 * Automatically generated - do not modify.
 */
package com.guardianapis.api.domain.xmlbeans.impl;
/**
 * A document containing one search(@) element.
 *
 * This is a complex type.
 */
public class SearchDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.guardianapis.api.domain.xmlbeans.SearchDocument
{
    private static final long serialVersionUID = 1L;
    
    public SearchDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SEARCH$0 = 
        new javax.xml.namespace.QName("", "search");
    
    
    /**
     * Gets the "search" element
     */
    public com.guardianapis.api.domain.xmlbeans.Search getSearch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.guardianapis.api.domain.xmlbeans.Search target = null;
            target = (com.guardianapis.api.domain.xmlbeans.Search)get_store().find_element_user(SEARCH$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "search" element
     */
    public void setSearch(com.guardianapis.api.domain.xmlbeans.Search search)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.guardianapis.api.domain.xmlbeans.Search target = null;
            target = (com.guardianapis.api.domain.xmlbeans.Search)get_store().find_element_user(SEARCH$0, 0);
            if (target == null)
            {
                target = (com.guardianapis.api.domain.xmlbeans.Search)get_store().add_element_user(SEARCH$0);
            }
            target.set(search);
        }
    }
    
    /**
     * Appends and returns a new empty "search" element
     */
    public com.guardianapis.api.domain.xmlbeans.Search addNewSearch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.guardianapis.api.domain.xmlbeans.Search target = null;
            target = (com.guardianapis.api.domain.xmlbeans.Search)get_store().add_element_user(SEARCH$0);
            return target;
        }
    }
}
